﻿using System;
using Abp.Domain.Entities.Auditing;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using FwProject.Core.Restaurant;
using FwProject.Core.Distribution;
using FwProject.Core.FactoryInfo;
using FwProject.Core.Car;
using Abp.AutoMapper;
using System.Collections.Generic;
using FwProject.Car.Dto;
using FwProject.Restaurant.Dto;
using Abp.Domain.Entities;

namespace FwProject.Distribution.Dto
{
    [AutoMap(typeof(DistributionInfo))]
    public class DistributionDto: Entity<Guid>,ICreationAudited
    {  

        /// <summary>
        /// 餐厅编号
        /// </summary>
        /// <value>The restaurantid.</value>

        [Display(Name ="餐厅编号")]
        public Guid Restaurantid { get; set; }
 
        public RestaurantDto RestaurantInfoModel { get; set; }
        /// <summary>
        /// 汽车编号
        /// </summary>
        /// <value>The carinfoid.</value>

        [Display(Name = "汽车编号")]
        public Guid Carinfoid { get; set; }
       
        public CarInfoDto CarInfoModel { get; set; }

        [Display(Name = "配送单号")]
        public string CreationNumber { get; set; }
        /// <summary>
        /// 支付状态
        /// </summary>
        /// <value>The pricestatus.</value>

        [Display(Name = "支付状态")]
        public Pricestatus Pricestatus { get; set; } = Pricestatus.已配送;
        /// <summary>
        /// 应支付金额
        /// </summary>
        /// <value>The price.</value>

        [Display(Name = "应支付金额")]
        public decimal TotalPrice { get; set; } = 0;

        /// <summary>
        /// 店存数
        /// </summary>

        public int Stock { get; set; } = 0;

        public int DistributionStock { get; set; } = 0;
        
        /// <summary>
        /// 装车编号
        /// </summary>
        /// <value>The load car identifier.</value>

        public Guid LoadCarId { get; set; }
         /// <summary>
         /// 装车模型
         /// </summary>
        public LoadCarDto LoadCarModel { get; set; }
        /// <summary>
        /// 当前车辆所有的型号
        /// </summary>
        public  List<DistributionDetailsDto> DistributionInfoListDetails { get; set; }
        /// <summary>
        /// 结账编码
        /// </summary>
        /// <value>The prices identifier.</value>
        [Display(Name = "结账编码")]
        public Guid SettlementId { get; set; }

        public long? CreatorUserId { get; set; }
        public DateTime CreationTime { get; set; }

        public int LoadCount { get; set; } = 0;
    }
   
}
